<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>编辑商户</title>
	<#include "lib/lib.html" />
</head>
<body>
	<form action="" method="post" class="form form-horizontal layui-form" id="form-company-add">
	<input type="hidden" name="id" value="${obj.id}"/>
	<div class="pop_main" style="padding-left:30px;width: 95%;">
		<div class="panel panel-primary mt-20">
	    	<div class="panel-header">公司信息</div>
	    	<div class="panel-body">
    		    <table class="table table-border table-bordered table-hover table-bg table-sort">
					<tbody>
						<tr>
	    		    		<td style="width:120px;"><strong>业务员：</strong></td>
	    		    		<td>
	    		    			${obj.saleName}
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>商户号：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" type="text" dataType="*" nullmsg="请填写商户公司名称" name="companyKey" class="dd_input input-text size-M" value="${obj.companyKey}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>商户密钥：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" type="text" dataType="*" nullmsg="请填写商户公司名称" name="companySecret" class="dd_input input-text size-M" value="${obj.companySecret}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>合作商户公司名称：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" type="text" dataType="*" nullmsg="请填写商户公司名称" name="companyName" class="dd_input input-text size-M" value="${obj.companyName}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>公司行业：</strong></td>
	    		    		<td>
	    		    			<select disabled="disabled" style="width:300px;" dataType="*" nullmsg="请选择公司行业" name="companyTrade" class="select size-M">
									<#if tradeList?? && tradeList?size gt 0>
									<#list tradeList as dl >
										<option value="${dl.id}" <#if dl.id==obj.companyTrade>selected="selected"</#if>>${dl.tradeName}</option>
									</#list>
									</#if>
								</select>
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>公司规模：</strong></td>
	    		    		<td>
	    		    			<select disabled="disabled" style="width:300px;" dataType="*" nullmsg="请选择公司规模" name="companyScale" class="select size-M">
									<option value="1" <#if obj.companyScale==1>selected="selected"</#if>>大型</option>
									<option value="2" <#if obj.companyScale==2>selected="selected"</#if>>中型</option>
									<option value="3" <#if obj.companyScale==3>selected="selected"</#if>>小型</option>
									<option value="4" <#if obj.companyScale==4>selected="selected"</#if>>微型</option>
									<option value="5" <#if obj.companyScale==5>selected="selected"</#if>>个体户</option>
								</select>
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>营业执照号码：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" type="text" dataType="*" nullmsg="请填营业执照号码" name="licenseNum" class="dd_input input-text size-M" value="${obj.licenseNum}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>注册地址：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" type="text" dataType="*" nullmsg="请填营业执照号码" name="licenseAddr" class="dd_input input-text size-M" value="${obj.licenseAddr}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>上传营业执照：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" readonly="readonly" type="text" class="width200 input-text size-M"  dataType="*" nullmsg="请上传营业执照" name="licensePic" id="licensePic" value="${obj.licensePic}"/>
	    		    			<a href="${obj.licensePic}" target="_blank" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i>查看</a>
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>组织机构代码：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" type="text" dataType="*" nullmsg="请填写组织机构代码" name="organizationCode" class="dd_input input-text size-M" value="${obj.organizationCode!}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>上传组织机构代码照：</strong></td>
	    		    		<td>
								<input disabled="disabled" style="width:300px;" readonly="readonly" type="text" class="width200 input-text size-M"  dataType="*" nullmsg="上传组织机构代码照" name="organizationCodeUrl" id="organizationCodeUrl" value="${obj.organizationCodeUrl!}"/>
								<a href="${obj.organizationCodeUrl!}" target="_blank" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i>查看</a>
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>开户许可证：</strong></td>
	    		    		<td>
								<input disabled="disabled" style="width:300px;" readonly="readonly" type="text" class="width200 input-text size-M"  dataType="*" nullmsg="开户许可证" name="licenseUrl" id="licenseUrl" value="${obj.licenseUrl!}"/>
								<a href="${obj.licenseUrl!}" target="_blank" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i>查看</a>
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>营业类型：</strong></td>
	    		    		<td>
	    		    			<select disabled="disabled" style="width:300px;" class="select size-M" dataType="*" nullmsg="请选择营业类型" name="licenseType">
									<option value="1" <#if obj.licenseType==1>selected="selected"</#if>>线上（互联网）</option>
									<option value="2" <#if obj.licenseType==2>selected="selected"</#if>>线下（实体店铺）</option>
									<option value="3" <#if obj.licenseType==3>selected="selected"</#if>>线上+线下</option>
								</select>
	    		    		</td>
	    		    	</tr>
    		    	</tbody>
			    </table>
	    	</div>
    	</div>
		<div class="panel panel-primary mt-20">
	    	<div class="panel-header">联系人信息</div>
	    	<div class="panel-body">
	    		<table class="table table-border table-bordered table-hover table-bg table-sort">
					<tbody>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>公司法人名称：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" class="dd_input input-text size-M" dataType="*" nullmsg="公司法人名称" type="text" name="legalName"  value="${obj.legalName!}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>法人身份证号码：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" class="dd_input input-text size-M" dataType="*" nullmsg="法人身份证号码" type="text" name="legalIdCard" id="legalIdCard" value="${obj.legalIdCard!}" onchange="ValidatelegalIdCard($(this),value)">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>上传身份证正面照：</strong></td>
	    		    		<td>
								<input disabled="disabled" style="width:300px;" readonly="readonly" type="text" class="width200 input-text size-M"  dataType="*" nullmsg="上传身份证正面照" name="positCard" id="positCard" value="${obj.positCard}"/>
								<a href="${obj.positCard}" target="_blank" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i>查看</a>
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>上传身份证反面照：</strong></td>
	    		    		<td>
								<input disabled="disabled" style="width:300px;" readonly="readonly" type="text" class="width200 input-text size-M"  dataType="*" nullmsg="上传身份证反面照" name="negatCard" id="negatCard" value="${obj.negatCard}"/>
								<a href="${obj.negatCard}" target="_blank" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i>查看</a>
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>联系人姓名：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" class="dd_input input-text size-M" dataType="*" nullmsg="输入联系人姓名" type="text" name="contactsName" value="${obj.contactsName}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>联系人电话：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" class="dd_input input-text size-M" dataType="*" nullmsg="输入联系人电话" type="text" name="contactsPhone" value="${obj.contactsPhone!}" onchange="ValidateFloat($(this),value)">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>联系人邮箱：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" class="dd_input input-text size-M" dataType="*" nullmsg="输入联系人电话" type="text" name="contactsMail" value="${obj.contactsMail!}" onchange="ValidateFloat($(this),value)">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>客服电话：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" class="dd_input input-text size-M" dataType="*" nullmsg="输入客服电话" type="text" name="servicePhone" value="${obj.servicePhone!}">
	    		    			<input type="checkbox" id="upSPhoneStatus" name="upSPhoneStatus" title="开启客服电话"  <#if obj.servicePhoneStatus == 1>checked="checked"</#if>/>
	    		    		</td>
	    		    	</tr>
    		    	</tbody>
			    </table>
	    	</div>
    	</div>
		<div class="panel panel-primary mt-20">
	    	<div class="panel-header">收款信息</div>
	    	<div class="panel-body">
	    		<table class="table table-border table-bordered table-hover table-bg table-sort">
					<tbody>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>开户银行：</strong></td>
	    		    		<td>
	    		    			<!-- <select disabled="disabled" style="width:300px;" class="select size-M" dataType="*" nullmsg="开户机构" name="accountBank">
									<#if bankList?? && bankList?size gt 0>
									<#list bankList as dl >
										<option value="${dl.bankName}" <#if obj.accountBank==dl.bankName>selected="selected"</#if>>${dl.bankName}</option>
									</#list>
									</#if>
								</select> -->
								<input style="width:300px;" disabled="disabled" class="dd_input input-text size-M" dataType="*" value="${obj.accountBank}" placeholder="精确到支行" nullmsg="开户机构，精确到支行  " type="text" name="accountBank">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>联行号：</strong></td>
	    		    		<td>
								<input style="width:300px;" disabled="disabled" class="dd_input input-text size-M" dataType="*" value="${obj.coupletNumber}" placeholder="联行号" nullmsg="联行号" type="text" name="coupletNumber">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>账户类型：</strong></td>
	    		    		<td>
								<select disabled="disabled" style="width:300px;" class="select size-M" dataType="*" nullmsg="请选择账户类型" name="accountType">
									<option value="1" <#if obj.accountType==1>selected="selected"</#if>>企业对公</option>
									<option value="2" <#if obj.accountType==2>selected="selected"</#if>>法人对私</option>
									<option value="3" <#if obj.accountType==3>selected="selected"</#if>>非法人对私</option>
								</select>
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>开户名称：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" class="dd_input input-text size-M" dataType="*" nullmsg="收款商户名" type="text" name="accountName" value="${obj.accountName!}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>开户账号：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" class="dd_input input-text size-M" dataType="*" nullmsg="收款账号" type="text" name="accountCard" value="${obj.accountCard!}">
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>到帐类型：</strong></td>
	    		    		<td>
	    		    			<select disabled="disabled" style="width:300px;" class="select size-M" id="wayArrivalType" name="wayArrivalType" size="1" onchange="show_Type()">
									<option value="1" <#if obj.wayArrivalType==1>selected="selected"</#if>>T+</option>
									<option value="2" <#if obj.wayArrivalType==2>selected="selected"</#if>>实时到账</option>
									<option value="3" <#if obj.wayArrivalType==3>selected="selected"</#if>>D+</option>
								</select>
	    		    		</td>
	    		    	</tr>
	    		    	
	    		    	<tr id="sssssss" <#if obj.wayArrivalType==2>style="display: none"</#if>>
	    		    		<td style="width:120px;"><strong>到账日期：</strong></td>
	    		    		<td>
	    		    			<input disabled="disabled" style="width:300px;" class="dd_input input-text size-M" type="text" placeholder="到账日期" id="wayArrivalValue" name="wayArrivalValue" value="${obj.wayArrivalValue}" datatype="*"  nullmsg="请输入到账日期" onchange="ValidateFloat($(this),value)"> 天
	    		    		</td>
	    		    	</tr>
    		    	</tbody>
			    </table>
	    	</div>
    	</div>
		<!-- <div class="panel panel-primary mt-20">
	    	<div class="panel-header">支付通道</div>
	    	<div class="panel-body">
	    		<table class="table table-border table-bordered table-hover table-bg table-sort">
					<tbody>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>通道路由规则：</strong></td>
	    		    		<td>
	    		    			<select disabled="disabled" style="width:100px;" class="select size-M" id="isRandom" name="isRandom" size="1">
									<option value="1" <#if obj.isRandom==1>selected="selected"</#if>>随机</option>
									<option value="2" <#if obj.isRandom==2>selected="selected"</#if>>排序</option>
									<option value="3" <#if obj.isRandom==3>selected="selected"</#if>>循环</option>
								</select>
	    		    		</td>
	    		    	</tr>
	    		    	<tr>
	    		    		<td style="width:120px;"><strong>支付通道配置：</strong></td>
	    		    		<td>
	    		    			<div id="chooseCity" style="font-size:0px;">
	    		    			<#if wayList?? && wayList?size gt 0>
								<#list wayList as dl >
									<#if dl_index ==0>
										<span>
										<select disabled="disabled" style="width:100px;" class="select" name="discoutShopRangeProvince" id="search_shopRangeProvince" onchange="payType('search_shopRangeProvince','span','')">
											<option value="0">请选择</option>
											<#if payList?? && payList?size gt 0>
												<#list payList as dl1 >
													<option value="${dl1.id}" <#if dl1.id == dl.payWayId>selected="selected"</#if>>${dl1.wayName}</option>
												</#list>
											</#if>
										</select><span id ="span">
											<#if dl.rateId!>
												<select disabled="disabled" style="width:180px;" class="select" name="discoutShopRangeCity" id="search_shopRangeCity" style="width:150px;">
													<#if dl.rateList?? && dl.rateList?size gt 0>
														<#list dl.rateList as dl1>
															<option value="${dl1.id}" <#if dl1.id == dl.rateId>selected="selected"</#if>>${dl1.rateName}</option>
														</#list>
													</#if>
												</select>
											</#if>
										</span>
										<b>费率设置:</b><input disabled="disabled" style="width:45px;" class="dd_input input-text size-M" type="text" name="payWayRate" id="payWayRate" value ="${dl.payWayRate}">
										<b>‰，通道排序:</b><input disabled="disabled" style="width:45px;" class="dd_input input-text size-M" type="text" name="sortNum" id="sortNum" value ="${dl.sortNum}" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
										<b>，每日限额:</b><input disabled="disabled" style="width:65px;" class="dd_input input-text size-M" type="text" name="maxMoney" id="maxMoney" value ="${dl.maxMoney}" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')">
										<b>元，单笔限额:</b><input disabled="disabled" style="width:50px;" class="dd_input input-text size-M" type="text" name="oneMinMoney" id="oneMinMoney" value ="${dl.oneMinMoney}" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"><b>元&nbsp;&nbsp;</b>
										<b>＜金额≤</b><input disabled="disabled" style="width:50px;" class="dd_input input-text size-M" type="text" name="oneMaxMoney" id="oneMaxMoney" value ="${dl.oneMaxMoney}" onchange="ValidateFloat($(this),value)"><b>元&nbsp;&nbsp;</b>
										<button type="button" onclick="add()" class="btn btn-success radius">添加</button>
										</span>
									<#else>
									<span>
										<br/>
										<select disabled="disabled" style="width:100px;" class="select" name="discoutShopRangeProvince" id="search_shopRangeProvince${dl_index}" onchange="payType('search_shopRangeProvince${dl_index}','span','${dl_index}')">
											<option value="0">请选择</option>
											<#if payList?? && payList?size gt 0>
												<#list payList as dl1 >
													<option value="${dl1.id}" <#if dl1.id == dl.payWayId>selected="selected"</#if>>${dl1.wayName}</option>
												</#list>
											</#if>
										</select><span id ="span${dl_index}">
											<#if dl.rateId!>
												<select disabled="disabled" style="width:180px;" class="select" name="discoutShopRangeCity" id="search_shopRangeCity${dl_index}">
													<#if dl.rateList?? && dl.rateList?size gt 0>
														<#list dl.rateList as dl1>
															<option value="${dl1.id}" <#if dl1.id == dl.rateId>selected="selected"</#if>>${dl1.rateName}</option>
														</#list>
													</#if>
												</select>
											</#if>
										</span>
										<b>费率设置:</b><input disabled="disabled" style="width:45px;" class="dd_input input-text size-M" type="text" name="payWayRate" id="payWayRate${dl_index}" value ="${dl.payWayRate}">
										<b>‰，通道排序:</b><input disabled="disabled" style="width:45px;" class="dd_input input-text size-M" type="text" name="sortNum" id="sortNum${dl_index}" value ="${dl.sortNum}" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
										<b>，每日限额:</b><input disabled="disabled" style="width:65px;" class="dd_input input-text size-M" type="text" name="maxMoney" id="maxMoney${dl_index}" value ="${dl.maxMoney}" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')">
										<b>元，单笔限额:</b><input disabled="disabled" style="width:50px;" class="dd_input input-text size-M" type="text" name="oneMinMoney" id="oneMinMoney${dl_index}" value ="${dl.oneMinMoney}" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"><b>元&nbsp;&nbsp;</b>
										<b>＜金额≤</b><input disabled="disabled" style="width:50px;" class="dd_input input-text size-M" type="text" name="oneMaxMoney" id="oneMaxMoney" value ="${dl.oneMaxMoney}" onchange="ValidateFloat($(this),value)"><b>元&nbsp;&nbsp;</b>
										<button type="button"  onclick="deleteLabel(this)" class="btn btn-danger radius">删除</button>
									</span>
									</#if>
								</#list>
								如果没有数据的时候 显示添加
								<#else>
								<span>
									<select disabled="disabled" style="width:100px;" class="select" name="discoutShopRangeProvince" id="search_shopRangeProvince" onchange="payType('search_shopRangeProvince','span','')">
										<option value="0">请选择</option>
										<#if payList?? && payList?size gt 0>
											<#list payList as dl >
												<option value="${dl.id}">${dl.wayName}</option>
											</#list>
										</#if>
									</select>
									<span id ="span">
									</span>
									<b>费率设置:</b><input disabled="disabled" style="width:45px;" class="dd_input input-text size-M" type="text" name="payWayRate" id="payWayRate">
									<b>‰，通道排序:</b><input disabled="disabled" style="width:45px;" class="dd_input input-text size-M" type="text" name="sortNum" id="sortNum" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')">
									<b>，每日限额:</b><input disabled="disabled" style="width:65px;" class="dd_input input-text size-M" type="text" name="maxMoney" id="maxMoney" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')">
									<b>元，单笔限额:</b><input disabled="disabled" style="width:50px;" class="dd_input input-text size-M" type="text" name="oneMinMoney" id="oneMinMoney" value ="${dl.oneMinMoney}" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"><b>元&nbsp;&nbsp;</b>
									<b>＜金额≤</b><input disabled="disabled" style="width:50px;" class="dd_input input-text size-M" type="text" name="oneMaxMoney" id="oneMaxMoney" value ="${dl.oneMaxMoney}" onchange="ValidateFloat($(this),value)"><b>元&nbsp;&nbsp;</b>
									<button type="button" onclick="add()" class="btn btn-success radius">添加</button>
								</span>
								</#if>
								</div>
	    		    		</td>
	    		    	</tr>
    		    	</tbody>
			    </table>
	    	</div>
    	</div> -->
    	<#if obj.companyStatus==1>
			<div class="submit_btn">
				<button style="width:100px;height:40px;vertical-align:middle;margin-right:100px;" type="button" name="" onclick='approveAgreePayv2BussCompany(${obj.id},1)' class="btn btn-warning radius"><i class="Hui-iconfont">&#xe676;</i> 通    过</button>
				<button style="width:100px;height:40px;vertical-align:middle;" type="button" name="" onclick='approveAgreePayv2BussCompany(${obj.id},2)' class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6a6;</i> 拒    绝</button>
				<!-- <button style="vertical-align:middle;" onclick='approveAgreePayv2BussCompany(${obj.id},1)'>通过</button>
				<button style="vertical-align:middle;" onclick='approveAgreePayv2BussCompany(${obj.id},2)'>拒绝</button> -->
			</div>
		</#if>
	</div>
	</form>
	<script>
		//Demo
		layui.use('form', function(){
		  var form = layui.form;
		  
		  //监听提交
		  form.on('submit(formDemo)', function(data){
		    layer.msg(JSON.stringify(data.field));
		    return false;
		  });
		});
		
		$("body").on("click",".layui-form-checkbox",function(){
			var butStatus = 2;
			if($("#upSPhoneStatus").prop("checked")){
				butStatus = 1
			}
			var companyId = $("[name='id']").val();
			/* console.log(companyId)
			console.log(butStatus) */
			$.ajax({
				type:"get",
				url:"${basePath}/payv2BussCompany/upSPhoneStatus.do?servicePhoneStatus="+butStatus+"&id="+companyId,
				async:false,
				success:function(data){
					if(data.resultCode == 200){
						layer.msg("修改成功", {
							icon : 1,
							time : 1000
						});
					}else{
						layer.msg(data.message, {
							icon : 2,
							time : 1000
						});
					}
				}
			})
		})
	</script>
	<script type="text/javascript">
		function approveAgreePayv2BussCompany(id,type){
			if(type == 1) {
				$.ajax({
					type:"get",
					url:"${basePath}/payv2BussCompany/companyHandle.do?companyId="+id+"&type="+type,
					async:false,
					success:function(data){
						console.log(data)
						if(data.resultCode == 200){
							layer.msg(data.message, {
								icon : 1,
								time : 1000
							});
							parent.location.replace("${basePath}/payv2BussCompany/companyList.do");
							parent.layer.close();
						}else{
							Huimodal_alert(data.message,1500);
						}
					}
				});
			} else if(type == 2) {
				layer.prompt({title: '请输入拒绝理由'},function(val, index){
					$.ajax({
						type:"get",
						url:"${basePath}/payv2BussCompany/companyHandle.do?companyId="+id+"&type="+type+"&companyPassReason="+val,
						async:false,
						success:function(data){
							console.log(data)
							if(data.resultCode == 200){
								layer.msg(data.message, {
									icon : 1,
									time : 1000
								});
								parent.location.replace("${basePath}/payv2BussCompany/companyList.do");
								parent.layer.close();
							}else{
								Huimodal_alert(data.message,1500);
							}
						}
					});
				});
			}
		}
		
		function approveAgreePayv2BussCompany1(id,type){
			var datas = {};
			datas.id = id;
			datas.type = type;
			if(type == 2) {
				layer.prompt({title: '请输入拒绝理由'},function(val, index){
					datas.companyPassReason = val;
				});
			}
			$.ajax({
				type:"post",
				url:"${basePath}/payv2BussCompany/companyHandle.do",
				data:datas,
				async:false,
				success:function(data){
					console.log(data)
					if(data.resultCode == 200){
						layer.msg(data.message, {
							icon : 1,
							time : 1000
						});
						parent.location.replace("${basePath}/payv2BussCompany/companyList.do");
						parent.layer.close();
					}else{
						Huimodal_alert(data.message,1500);
					}
				}
			});
		}
	</script>
</body>
</html>